<%@ Page Language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.Framework.DefaultPage" CodeFile="Default.aspx.vb" MaintainScrollPositionOnPostback="true" EnableEventValidation="false" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Common.Controls" Assembly="DotNetNuke" %>
<asp:literal id="skinDocType" runat="server"></asp:literal>
<html>
<head id="Head" runat="server">
    <meta id="MetaRefresh" runat="Server" name="Refresh" />
    <meta id="MetaDescription" runat="Server" name="DESCRIPTION" />
    <meta id="MetaKeywords" runat="Server" name="KEYWORDS" />
    <meta id="MetaCopyright" runat="Server" name="COPYRIGHT" />
    <meta id="MetaGenerator" runat="Server" name="GENERATOR" />
    <meta id="MetaAuthor" runat="Server" name="AUTHOR" />
    <meta name="RESOURCE-TYPE" content="DOCUMENT">
    <meta name="DISTRIBUTION" content="GLOBAL">
    <meta name="ROBOTS" content="INDEX, FOLLOW">
    <meta name="REVISIT-AFTER" content="1 DAYS">
    <meta name="RATING" content="GENERAL">
    <meta http-equiv="PAGE-ENTER" content="RevealTrans(Duration=0,Transition=1)">
    <style type="text/css" id="StylePlaceholder" runat="server"></style>
    <asp:placeholder id="CSS" runat="server"></asp:placeholder>
</head>
<body id="Body" runat="server" bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0" marginwidth="0" marginheight="0">
    <noscript></noscript>
    <dnn:Form id="Form" runat="server" ENCTYPE="multipart/form-data" style="height: 100%;">
        <asp:Label ID="SkinError" runat="server" CssClass="NormalRed" Visible="False"></asp:Label>
        <asp:PlaceHolder ID="SkinPlaceHolder" runat="server" />
        <input id="ScrollTop" runat="server" name="ScrollTop" type="hidden">
        <input id="__dnnVariable" runat="server" name="__dnnVariable" type="hidden">
    </dnn:Form>
    
    <div id="divAdRight" style="left: 300px; width: 170px; position: absolute; vertical-align: top; text-align: center;" align="right">
        <asp:GridView ID="gvAdvertRight" runat="server" AutoGenerateColumns="False" BorderStyle="None" DataSourceID="dsAdvertRight" GridLines="None" ShowHeader="False" HorizontalAlign="Center">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.url").ToString() %>' Target="_blank">
                                    <asp:Image ID="Image1" runat="server" AlternateText='<%# Bind("altDescription") %>'
                                        ImageUrl='<%# getImage(DataBinder.Eval(Container, "DataItem.advertFile").ToString()) %>'
                                        ToolTip='<%# Bind("description") %>'/>
                    </asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <RowStyle HorizontalAlign="Center" />
        </asp:GridView><asp:SqlDataSource ID="dsAdvertRight" runat="server"></asp:SqlDataSource>
    </div>
<div id="divAdLeft" style="width: 170px; position: absolute;">
    <asp:GridView ID="gvAdvertLeft" runat="server" AutoGenerateColumns="False" BorderStyle="None" DataSourceID="dsAdvertLeft" GridLines="None" ShowHeader="False" HorizontalAlign="Center">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.url").ToString() %>' Target="_blank">
                                    <asp:Image ID="Image1" runat="server" AlternateText='<%# Bind("altDescription") %>'
                                        ImageUrl='<%# getImage(DataBinder.Eval(Container, "DataItem.advertFile").ToString()) %>'
                                        ToolTip='<%# Bind("description") %>'/>
                    </asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <RowStyle HorizontalAlign="Center" />
        </asp:GridView><asp:SqlDataSource ID="dsAdvertLeft" runat="server"></asp:SqlDataSource>
</div>
<!--Script quang cao - Khong duoc thay doi-->
<script language="JavaScript">		
	function FloatTopDivRight()
	{
		//startX = document.body.clientWidth - 170, startY = 20;
		startX = 835, startY = 20;
		var ns = (navigator.appName.indexOf("Netscape") != -1);
		var d = document;
			
		if (document.body.clientWidth < 980) 
		    startX = -1024;

		
		function ml(id)
		{
			var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
			if(d.layers)el.style=el;
			el.sP=function(x,y){this.style.left=x;this.style.top=y;};
			el.x = startX;
			el.y = startY;
			return el;
		}
		
		window.stayTopLeft=function()
		{
			if (document.body.clientWidth < 980)
			{
				ftlObj.x = - 115;ftlObj.y = 0;	
				ftlObj.sP(ftlObj.x, ftlObj.y);
			}
			else
			{
			if (document.documentElement && document.documentElement.scrollTop)
				var pY = ns ? pageYOffset : document.documentElement.scrollTop;
			else if (document.body)
				var pY = ns ? pageYOffset : document.body.scrollTop;

			if (document.body.scrollTop > 20){startY = 3} else {startY = 20};

			if (document.body.clientWidth >= 1024)
			{
				//ftlObj.x = document.body.clientWidth - 110;
				ftlObj.x = startX;
				ftlObj.y += (pY + startY - ftlObj.y)/32;
				ftlObj.sP(ftlObj.x, ftlObj.y);
			}
			else
			{
		    	ftlObj.x  = startX;
		    	ftlObj.y += (pY + startY - ftlObj.y)/32;
		    	ftlObj.sP(ftlObj.x, ftlObj.y);
			}
			}
			setTimeout("stayTopLeft()", 1);
		}
		
		ftlObj = ml("divAdRight");
		stayTopLeft();
	}
function FloatTopDivLeft()
	{
		startX2 = 5, startY2 = 20;
		var ns2 = (navigator.appName.indexOf("Netscape") != -1);
		var d2 = document;
			
		if (document.body.clientWidth < 980) startX2 = -110;

		
		function ml2(id)
		{
			var el2=d2.getElementById?d2.getElementById(id):d2.all?d2.all[id]:d2.layers[id];
			if(d2.layers)el2.style=el2;
			el2.sP=function(x,y){this.style.left=x;this.style.top=y;};
			el2.x = startX2;
			el2.y = startY2;
			return el2;
		}
		
		window.stayTopLeft2=function()
		{
			if (document.body.clientWidth < 980)
			{
				ftlObj2.x = - 115;
				ftlObj2.y = 0;	
				ftlObj2.sP(ftlObj2.x, ftlObj2.y);
			}
			else
			{
			if (document.documentElement && document.documentElement.scrollTop)
				var pY2 = ns2 ? pageYOffset : document.documentElement.scrollTop;
			else if (document.body)
				var pY2 = ns2 ? pageYOffset : document.body.scrollTop;

			if (document.body.scrollTop > 20){startY2 = 3} else {startY2 = 20};

			if (document.body.clientWidth >= 1024)
			{
				ftlObj2.x =  0;
				ftlObj2.y += (pY2 + startY2 - ftlObj2.y)/32;	
				ftlObj2.sP(ftlObj2.x, ftlObj2.y);
			}
			else
			{			
	    		ftlObj2.x  = startX2;
		    	ftlObj2.y += (pY2 + startY2 - ftlObj2.y)/32;
			    ftlObj2.sP(ftlObj2.x, ftlObj2.y);
			}
			}
			setTimeout("stayTopLeft2()", 1);
		}
		
		ftlObj2 = ml2("divAdLeft");
		stayTopLeft2();
	}

	function ShowAdDiv()
	{
		var objAdDivLeft  = document.getElementById("divAdLeft");
		var objAdDivRight = document.getElementById("divAdRight");
		if (document.body.clientWidth < 980)
		{
			objAdDivLeft.style.left  = - 110;
			objAdDivRight.style.left = - 110;
		}
		else
		{
			objAdDivLeft.style.left  = 0;
			objAdDivRight.style.left = 835;
		}
		FloatTopDivLeft();
		FloatTopDivRight();
	}
	ShowAdDiv();
		</script>
</body>
</html>
